Social Security Series 2-file system and Social Security Series 2

Source: Internet
Author: User

Social Security Series 2-file system and Social Security Series 2

Cards allow you to create your own file system in the available space. Supports multi-level directory structure. Files in the same-layer directory cannot have the same ID (identifier ).

 

Data elements in a data file are stored in record or binary format. The file structure and reference mode are determined by the purpose of the file. In addition to directory files, the content and layout of data files are described in section 6th of the Social Security (individual) card specification: Application Data Structure, which can also be supplemented and defined by the issuer.

 

1. Three types of special files (DF:

Ø MF: root directory, which is the root of the entire file system and belongs to the application environment. EF (basic file), SF (security file), DDF (directory file), and ADF (application file) can be used in MF );

Ø DDF: directory file used to define an application environment, which is a collection of applications. DDF can have the following structures: ADF, subddf, EF, SF, public key file, and private key file.

Ø ADF: application file used to define a specific application. You can have EF, SF, public key, and private key files under the ADF.


An AEF contains one or more raw BER-TLV Data Objects (AEF in the record structure), or an unstructured pure data element (AEF in a transparent structure ). After an application is selected, AEF can query both by its file identifier and its short File Identifier (SFI. The AEF of the record structure has the following attributes: The record length is fixed or variable; the record organization structure is linear or cyclic.

 

Four basic file (EF) types:

Ø transparent file: The file data is accessed through the byte address in the continuous space.

Ø record file: data is recorded in a fixed-length format, and the file can contain a maximum of 255 records. For plaintext access, the maximum record length can be 255 bytes. The record file has the following forms:

1) linear fixed length record file: all records in the same file are of the same length.

2) Linear Variable Length record file: the length of each record in the same file can be unequal.

3)Cyclic fixed-length record file: all records in the same file are of the same length. Supports circular access to records in files.

 

Transaction files: these files are in a specific format. Use transaction commands to operate such files. Transaction files can be in the following forms:

1) Personal account file: complete account transfer and medical consumption transactions. The user password must be submitted before the account is transferred into the transaction. Applicable to the social security environment.

2) Electronic passbook: complete the deposit and consumption transactions. The user password must be submitted before the transaction command is executed. Applicable to financial environments.

3) E-Wallet files: complete storage and consumption transactions. The user password must be submitted before the deposit transaction is executed. Applicable to financial environments.

 

Ø security file type (SF ):

1)Security File: This file can only be written and cannot be read. The key or password can be stored in the file.

 

 

2. file query

According to its type, files can be queried by file name, File Identifier, or SFI.

1) file name query: Any ADF or DDF in the card can be queried by its DF name. The DF name of the ADF corresponds to its AID, and each DF name should be unique in the given card.

 

2) File Identifier query: Any ADF, DDF, or AEF in the card can be queried by its File Identifier. The file identifier of each DF should be unique in a given card, the file identifier of AEF must be unique in a given application.

 

3) SFI query: SFI is used to select AEF. For any AEF in a given application, you can use SFI (5-bit code, the value range is from 1 ~ 30) query. SFI encoding is described in each command that uses it. SFI should be unique in a given application. The use of dedicated SFI is determined by the application.

 

 

3. Directory files

The directory file of the social security system is a linear file identified by a 5 to 15 short File Identifier (SFI. This directory file is attached to DDF, and SFI of the directory file is included in DDF file control information. You can use the "READRECORD" command to read directory files. A record in a directory file can contain several entry addresses, but one entry address cannot be stored across multiple records. Each entry address of the social security system directory file is an Application Template (61 tags ).

 

In the IC card, other directories outside the social security system are optional and do not limit the number of their existence. The location of each directory is specified by the SFI data object in the FCI Directory included in each DDF. If no directory file exists, it is deemed that the Social Security card contains all the applications defined in the Social Security (personal) card specification.

 

 

The DDF directory entry address format is as follows:

Flag

Length

Value

Status

'4f'

5-16

DDF name

M

 

 

The format of the entry address of the ADF directory is as follows:

Flag

Length

Value

Status

'4f'

5-16

ADF name (AID)

M

'50'

1-16

Application tag

M

 

 

 

The terminal can determine the applications supported by the card by using the social security environment directory file. The steps for the terminal to correctly use the social security directory file are as follows:

 

1) After the terminal enters the Social Security system environment, if the directory file does not exist, go to step 5); If the directory file exists, go to the directory file.

2) The terminal starts from the first record and continuously reads all records in the directory until the card returns '6a83 ', indicating that the sequence number of the required record does not exist. When you run the "read record" command to find the first RECORD, if the card returns SW1 SW2 = '6a83 ', it indicates that the directory is empty, go to step 5 ).

3) if the directory contains an application name that is supported by the terminal, the application will be included in the "Candidate List" selected by the final application.

4) if the directory contains an entry address pointing to DDF, And the DDF name matches at least the first few digits of the AID supported by the terminal (for example: DDF named D156123456 can match D15612345678), then the terminal selects the DDF. Use the directory short File Identifier (SFI) in the selected DDF file control information (FCI) to read the Directory and process it in step 3. Then, the terminal proceeds back to the previous directory for processing.

5) after the terminal completes the list of the Environment directories of the social security system, all the ADF files that can be found in this way are determined and the search is complete.

6) terminals can also use other methods to find other dedicated applications in the card (for example, using AID to find out the dedicated selection methods for local-specific or non-social security applications), but they are not within the scope of this provision.



What are the two files downloaded from the Social Security Center?

Sorry, I don't know the format of your file? If your company is an insurance company, the file you downloaded is the basic medical data and basic data of the company. You only need to import these two files into your system and then perform subsequent operations.
Data Import
Insurance companies use data exchange in the Enterprise Edition Software → import basic medical data/basic data of four insurances → browse → select the medical and four insurances data file downloaded from the Social Security Center → open → Import
Note:
1. When importing operational data, you must first import basic medical data and then import basic data of four insurances.
2. The file name format of the basic medical data exported from the Social Security Center for the insured unit is 1080 _ Social Security No. _ organization name _ V2.2.2.dat.
3. The file name format of the basic data exported by the Social Security Center for the Insurance Unit is: Social Security number _ SX _ Export Date and time. dat.
Hope to help you!

Social security documents

This year, policies have been introduced in some places. For retirees who do not have a pension, they can pay social insurance premiums at one time and receive a monthly social insurance pension. The condition is:

1. Working Age;
2. There are archives;
3. Retired.

Consultation on labor security hotline 2333

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.