Progress0 of 0 lessons

CICS GDS ASSIGN - General Data Stream Assignment

CICS GDS ASSIGN is a command used to assign conversation attributes and establish communication parameters for General Data Stream (GDS) sessions in CICS APPC environments. It configures conversation characteristics for optimal data exchange.

What is CICS GDS ASSIGN?

CICS GDS ASSIGN configures conversation attributes and establishes communication parameters for GDS sessions. It allows programs to set conversation characteristics, define data transfer modes, and configure session behavior for APPC communications.

Command Syntax

cobol
1
2
3
4
5
6
EXEC CICS GDS ASSIGN CONVID(conversation-id) ATTRIBUTES(attribute-list) RESP(response-code) RESP2(response-code-2) END-EXEC.

Parameters Explained

CONVID Parameter

Specifies the conversation identifier:

  • Must be obtained from GDS ALLOCATE
  • Identifies the active conversation
  • Required for all GDS operations
  • Must be valid and active

ATTRIBUTES Parameter

Specifies conversation attributes:

  • Defines conversation behavior
  • Sets data transfer characteristics
  • Configures session parameters
  • Determines communication mode

Conversation Attributes

1. Data Transfer Attributes

  • SYNC_LEVEL: Synchronization level
  • CONFIRM: Confirmation requirements
  • DEALLOCATE: Deallocation behavior
  • SECURITY: Security level

2. Communication Attributes

  • CONV_TYPE: Conversation type
  • CONV_DIR: Conversation direction
  • CONV_STATE: Conversation state
  • CONV_FLAGS: Conversation flags

3. Performance Attributes

  • BUFFER_SIZE: Buffer size
  • TIMEOUT: Timeout values
  • PRIORITY: Conversation priority
  • THROUGHPUT: Throughput requirements

Implementation Example

cobol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
WORKING-STORAGE SECTION. 01 WS-CONVERSATION-ID PIC S9(8) COMP. 01 WS-RESPONSE PIC S9(8) COMP. 01 WS-RESPONSE2 PIC S9(8) COMP. 01 WS-ATTRIBUTES. 05 WS-SYNC-LEVEL PIC X(1) VALUE '2'. 05 WS-CONFIRM PIC X(1) VALUE 'Y'. 05 WS-DEALLOCATE PIC X(1) VALUE 'N'. 05 WS-SECURITY PIC X(1) VALUE 'H'. PROCEDURE DIVISION. EXEC CICS GDS ASSIGN CONVID(WS-CONVERSATION-ID) ATTRIBUTES(WS-ATTRIBUTES) RESP(WS-RESPONSE) RESP2(WS-RESPONSE2) END-EXEC. IF WS-RESPONSE NOT EQUAL DFHRESP(NORMAL) EXEC CICS WRITE OPERATOR TEXT('GDS ASSIGN failed') END-EXEC EXEC CICS RETURN END-EXEC END-IF. * Conversation attributes assigned successfully * Continue with data transfer operations EXEC CICS GDS ASSIGN CONVID(WS-CONVERSATION-ID) ATTRIBUTES(WS-ATTRIBUTES) RESP(WS-RESPONSE) RESP2(WS-RESPONSE2) END-EXEC. IF WS-RESPONSE NOT EQUAL DFHRESP(NORMAL) EXEC CICS WRITE OPERATOR TEXT('GDS ASSIGN failed') END-EXEC EXEC CICS RETURN END-EXEC END-IF. * Conversation attributes assigned successfully * Continue with data transfer operations

Synchronization Levels

Level 0 - None

No synchronization:

  • No confirmation required
  • Fastest data transfer
  • No error recovery
  • Suitable for non-critical data

Level 1 - Confirm

Confirmation required:

  • Data delivery confirmation
  • Basic error recovery
  • Moderate performance
  • Suitable for most applications

Level 2 - Syncpoint

Syncpoint synchronization:

  • Transaction synchronization
  • Full error recovery
  • Slower performance
  • Suitable for critical data

Common Response Codes

Success Response Codes

  • NORMAL (0): Assignment successful
  • CONVERSATION (4): Conversation configured

Error Response Codes

  • INVREQ (16): Invalid request
  • NOTFND (20): Conversation not found
  • INVREQ (22): Invalid attributes
  • CONVERSATION (24): Conversation error

Best Practices

1. Attribute Selection

  • Choose appropriate sync level
  • Set security requirements
  • Configure timeout values
  • Optimize buffer sizes

2. Error Handling

  • Check all response codes
  • Handle assignment failures
  • Implement retry logic
  • Log error conditions

3. Performance Optimization

  • Use appropriate sync levels
  • Optimize buffer sizes
  • Set reasonable timeouts
  • Monitor conversation performance

Explain It Like I'm 5 Years Old

Imagine you're setting up a game with your friend:

Before you start playing, you need to decide what rules to follow. Will you play for fun or for keeps? How long will each turn be? What happens if someone makes a mistake?

CICS GDS ASSIGN is like setting up the rules for your game. It tells the computer how to behave when it's talking to another computer - how fast to send messages, whether to wait for confirmation, and what to do if something goes wrong.

Just like you might choose different rules for different games, the computer can choose different settings depending on what kind of conversation it's having. Some conversations need to be very careful and slow, while others can be fast and loose.

Exercises

Exercise 1: Attribute Configuration

Configure a GDS conversation with sync level 2, confirmation required, and high security. Write the GDS ASSIGN command.

cobol
1
2
3
4
5
EXEC CICS GDS ASSIGN CONVID(WS-CONVERSATION-ID) ATTRIBUTES(WS-ATTRIBUTES) RESP(WS-RESPONSE) END-EXEC.

Exercise 2: Sync Level Selection

When would you use sync level 0, 1, and 2? What are the trade-offs between performance and reliability?

Answer: Use sync level 0 for non-critical data requiring maximum speed, level 1 for most applications needing basic confirmation, and level 2 for critical data requiring full transaction synchronization with slower performance.

Quiz

Question 1

What is the primary purpose of CICS GDS ASSIGN?

Answer: B) To configure conversation attributes

Question 2

Which synchronization level provides the fastest data transfer?

Answer: A) Level 0

Related Pages